import { DotLoading } from 'antd-mobile';
import { FC } from 'react';
import { useTranslation } from 'react-i18next';

const InfiniteScrollContent: FC<{
  hasMore: boolean;
}> = ({ hasMore }) => {
  const { t } = useTranslation();

  return (
    <>
      {hasMore ? (
        <>
          <span>{t('loading')}</span>
          <DotLoading />
        </>
      ) : (
        <span>--- {t('nomore')} ---</span>
      )}
    </>
  );
};

export default InfiniteScrollContent;
